package com.example.m2.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.service1.common.pojo.M2;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface M2Mapper extends BaseMapper<M2> {

    @Insert("insert into m2(id,name,age) VALUES(#{et.id},#{et.name},#{et.age}) " +
            "ON DUPLICATE KEY UPDATE " +
            "age = ${et.age}")
    int updateInfo(@Param(Constants.ENTITY) M2 m2);
}
